<?php
	global $uid;
	$link = edp_href_link( PAGENAME_USER_REVIEW, "uid=$uid" );
?>
 <div class="main_box">
    	<div class="left_bar">
        <!--*********************-->
        	<div class="order_box">
            	<h1></h1>
                <h2>
                	<div class="ordertitle"><?php secho( $user ); ?>的点评（<?php echo $reviewCount; ?>）</div>
                    <div class="orderlink">
                    	
                    	<div class="orderlinktxt">
                    	
	                      <form method="GET" id="sortform" name="sortform" >
	       					 <input name="sortby" id="sortby" type="hidden" value="<?php echoPageVar($pageVars, "sortby")?>" />	        
	                        	排序：<a id="review_date" href="<?php echo $link . '/?sortby=review_date'?>">点评时间</a>|
	                        	<a id="response_count" href="<?php echo $link . '/?sortby=response_count'?>">回应数</a>|
	                        	<a id="flower_count" href="<?php echo $link . '/?sortby=flower_count'?>">鲜花数</a>|
	                        	<a id="score" href="<?php echo $link . '/?sortby=score'?>">评分</a>
	                       </form>
                        
                        </div>
                        
                    </div>
                </h2>
                <h3></h3>
            </div>
             <!--*********************-->
            <div class="review_box">
 		
			<?php if( isset($pageVars['reviews'])&&count($pageVars['reviews'])>0 ){
 	           
 	         	  foreach( $pageVars['reviews'] as $review ) {?>
 	           		
            	<div class="review_item">
                
                	<div class="review_left">
                        <dl class="user_box">
                            <dt><a href="<?php echo edp_href_link(PAGENAME_USER_INFO, 'uid='.$review['user_id']);?>">
                            <img src="<?php echo EdpGetAvatarUrl( $review['logo_path'] ); ?>" width="80" height="80" /></a></dt>
                            <dd>
                            	<h1><a href="<?php echo edp_href_link(PAGENAME_USER_INFO, 'uid='.$review['user_id']);?>" style="line-height:14px;">
                            	<?php secho( $review['nick'] ); ?></a></h1>
                                <div class="degree_box">                          	
                                 	<div class="degree_icon_<?php echo getUserRankClass($review['contribution']); ?>"></div></h1>
                             <div style="clear: both"></div>
                              </div>
                                      <div style="clear: both"></div>
                            </dd>                           
                        </dl>
                     </div>
                     
                     <div class="review_right">
           	   	   	   <div class="review_topbg"></div>
                   	   <div class="review_right_box">
					   <div class="review_body_title"><a href="<?php echo edp_href_link(PAGENAME_SHOP_INFO, 'sid='.$review['shop_id']);?>"><?php secho( $review['shop_name'] ); ?></a></div>
                        	
                        	<div class="review_1">
							
                            	<div class="point_box">

                                    <div class="score<?php echo $review['score']+1;?>"></div>

                                </div>
                                <h2>宝贝真实度</h2><h3><?php echoPageVar($review, 'reality'); ?></h3>
                                <h2>服务态度</h2><h3><?php echoPageVar($review, 'service'); ?></h3>
                                <h2>发货速度</h2><h3><?php echoPageVar($review, 'velocity'); ?></h3>
                                <h2>性价比</h2><h3><?php echoPageVar($review, 'rate'); ?></h3>
                        	</div>
                        	
                        	<?php if($review['product_list']){?>                        	
	                         	<dl class="review_2">
	                            	<dt>所买商品：</dt>
	                                <dd>	                                
	                                <?php foreach ($review['product_list'] as $product_info) {?>
										<span><a href="<?php echo edp_href_link(PAGENAME_PRODUCT_INFO, 'pid='.$product_info['id']);?>"><?php secho( $product_info['product_name'] ); ?> </a></span>
									<?php }?>									
								   </dd>
	                            </dl>	                        
                        	<?php }?>
	                        			    
                            <div class="review_3">    
                            <?php 
                            		if(EdpStrLen($review['content'])>150)
									{
										secho(EdpSubStr($review['content'], 0, 150 )."...");
									}
									else 
									{
										secho($review['content']);
									} 
                            ?>
                            	<a href="<?php echo edp_href_link(PAGENAME_REVIEW_INFO,'rid='.$review['id']); ?>">详情>></a>
                            </div>
        
        				   <?php if($review['tags']){?>                    
	                            <dl class="review_4">
	                            	<dt>标签：</dt>      
	                            	<dd>                          
	                                <?php foreach ($review['tags'] as $tag) {?>
									<a href="<?php echo edp_href_link(PAGENAME_SHOP_SEARCH_RESULT,'q='.$tag); ?>"><?php secho( $tag ); ?></a>
									<?php }?>
									</dd>
	                            </dl>
                            <?php }?>
                            
  							<?php if($review['pic_list']){?>                           
	                            <dl class="review_6">
	                            	<dt>图片：</dt>
	                                <dd>	                                
	                            	<?php foreach ($review['pic_list'] as $pic_info) {?>
									<span><a href="<?php echo EdpGetPicURL($pic_info['picture_path']); ?>"><?php echo $pic_info['name']; ?></a></span>
								    <?php } ?>
									</dd>							
	                            </dl>
	                        <?php }?> 
	                        
	                           
                            <div class="review_edit">
                            	<h1>
                            	<span>发表于 <?php echoPageVar($review, 'review_date'); ?></span>
                            	<?php
                            	if($logid!=$uid) 
                            	{
                            	?>
                            	<a href="<?php echo edp_href_link(PAGENAME_REVIEW_INFO, 'rid='.$review['id'].'#reponse_anchor');?>">
                            	回应
                            	<?php 
                            	if(intval($review['response_count'])>0)
                            	{ 
                            		echo '<span>('.$review['response_count'].')</span>'; 
                            	}
                            	?>
                            	</a>
                            	<a id="Flower<?php echo $review['id'];?>" onclick="popupFlowerWindow('review','<?php echo $review['id']; ?>')"  href="#">鲜花</a><?php if(intval($review['flower_count'])>0) echo '<span id="Flower'.$review['id'].'" >('.$review['flower_count'].')</span>'; ?>
                            	<a id="Egg<?php echo $review['id'];?>" onclick="popupEggWindow('review','<?php echo $review['id']; ?>')"  href="#">鸡蛋</a><?php if(intval($review['egg_count'])>0) echo '<span id="Egg'.$review['id'].'" >('.$review['egg_count'].')</span>'; ?>
                            	<?php } ?>
                            	</h1>
                            	<a href="<?php echo edp_href_link( PAGENAME_SHOP_INFO, "sid=".$review['shop_id']."#ar" );?>"><img src="<?php echo IMAGE_DIR; ?>btn_add_review2.jpg" /></a>
                            	
                            	<?php if($logid && $logid==$uid) {?>
                            	<h2>
                            		<a href="<?php echo edp_href_link(PAGENAME_ADD_REVIEW,'sid='.$review['shop_id'].'&rid='.$review['id']); ?>">修改评论</a>
                            		<a href="#" tag="delete" rid="<?php echo $review['id']; ?>">删除评论</a>
                            	</h2>
                            	<?php } ?>
                            	
                            </div>
                       </div>
                        <div class="review_bottombg"></div>
                	</div>
       		  </div>
       		  <?php
				 }
				}
       		   ?>
 	      </div>
 	      
        <!--*************************************-->
        <div class="review_bottomline"></div>
             <!--****************************************-->
             <div class="pagebox">
             <?php 	echoPageVar( $pageVars, "pagebar" ); ?>
             </div>
        <!--*************************************-->
      </div>

<div id=flowerAndEggBox style="display:none;cursor:default;" class="popup"></div>        
 